Advertising

Welcome to SparkyLinux forums
Zapraszamy również na polsko-języczne Forum https://forum.linuxiarze.pl

(Solved) "DNS Lookup Failed"

Started by frogprince, April 15, 2014, 01:46:03 AM

Previous topic - Next topic

frogprince

After my last update, I can no longer access the internet from either wired or wireless connection. I booted Knoppix from a flash drive and was easily able to connect via wifi and bring up the duckduckgo.com search engine, so it's not the hardware. My desktop machines and my wife's lap top all connect and run as well, so it's not the ISP or the connection. I tried running ifconfig, but got a message that that command wasn't installed on my system, and without a connection, I can't install it. Running apt-get update gets me a long list of sources with "failed to resolve". I searched the Debian forums and bug reports from my desk top machine, but found nothing like this. The connection icon indicates that the system is connected; it just won't resolve the DNS. Has anyone else seen this?



Thanks in advance.

pavroo

#1
It looks like the last update went wrong.

Run the command to try fix it:

Code:

dpkg --configure -a


Nothing is easy as it looks. Danielle Steel
Join #sparkylinux.org at [url="//irc.libera.chat"]irc.libera.chat[/url]

frogprince

#2
Pavroo: thanks for responding! I ran that, but to no avail; I still have the same error.

pavroo

#3
OK, run it and show me the output:

Code:

ping -c 2 46.28.247.119


and:

Code:

cat /etc/networks
cat /etc/network/interfaces
cat /etc/resolv.conf


and as root:

Code:

ifconfig -a


Nothing is easy as it looks. Danielle Steel
Join #sparkylinux.org at [url="//irc.libera.chat"]irc.libera.chat[/url]

frogprince

#4
Here we go:



Code:

myusername@dellx1:~$ ping -c 2 46.28.247.119
PING 46.28.247.119 (46.28.247.119) 56(84) bytes of data.

--- 46.28.247.119 ping statistics ---
2 packets transmitted, 0 received, 100% packet loss, time 1009ms

myusername@dellx1:~$ cat /etc/networks
default      0.0.0.0
loopback   127.0.0.0
link-local   169.254.0.0

myusername@dellx1:~$ cat /etc/network/interfaces
auto lo
iface lo inet loopback

myusername@dellx1:~$ cat /etc/resolv.conf
# Generated by NetworkManager
domain zoomtown.com
search zoomtown.com
nameserver 192.168.0.1
myusername@dellx1:~$ su
Password:

root@dellx1:/home/myusername# ifconfig -a
eth0      Link encap:Ethernet  HWaddr 00:12:3f:69:10:ef  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:16

eth1      Link encap:Ethernet  HWaddr 00:12:f0:74:a1:18  
          inet6 addr: fe80::212:f0ff:fe74:a118/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:825 errors:756 dropped:756 overruns:0 frame:0
          TX packets:132 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:205266 (200.4 KiB)  TX bytes:15670 (15.3 KiB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:239 errors:0 dropped:0 overruns:0 frame:0
          TX packets:239 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:21807 (21.2 KiB)  TX bytes:21807 (21.2 KiB)

root@dellx1:/home/myusername#



pavroo

#5
Try manually to bring the interfaces up (as root):

Code:

ifdown -a
ifup -a


Nothing is easy as it looks. Danielle Steel
Join #sparkylinux.org at [url="//irc.libera.chat"]irc.libera.chat[/url]

frogprince

#6
Unfortunately:

Code:

myusername@dellx1:su
Password:
root@dellx1:/home/myusername# ifdown  -a
root@dellx1:/home/myusername# ifup  -a
root@dellx1:/home/myusername# ping -c 2 46.28.247.119
PING 46.28.247.119 (46.28.247.119) 56(84) bytes of data.

--- 46.28.247.119 ping statistics ---
2 packets transmitted, 0 received, 100% packet loss, time 1001ms







MoroS

#7
Hi.



It's strange, as Wicd or NetworkManager should be managing your network connection in Sparky. Maybe check out that first. Depending on which you have installed try running:

Code:

sudo service wicd restart


or

Code:

sudo service network-manager restart




Alternatively, if the interface is up ("UP BROADCAST ..."), which is your case, then you can use either dhcpcd or dhclient (depending on which one is installed). Run either:

Code:

sudo dhcpcd ethX


(X being the interface number - 0 or 1 in your case) or

Code:

sudo dhclient ethX




Let us know if that helped. It's only a temporary solution and after a reboot the problem should return, but it'll help us identify what's wrong.
There's no such thing as "impossible". :)

frogprince

#8
MoroS: We're finally on to something. I have network-manager, but restarting it did not help. dhcpcd isn't installed, but dhclient is:



Code:

root@dellx1:/home/myusername# service network-manager restart
root@dellx1:/home/myusername# ping -c 2 46.28.247.119
PING 46.28.247.119 (46.28.247.119) 56(84) bytes of data.

--- 46.28.247.119 ping statistics ---
2 packets transmitted, 0 received, 100% packet loss, time 1002ms

root@dellx1:/home/myusername# dhcpcd eth1
bash: dhcpcd: command not found
root@dellx1:/home/myusername# dhclient eth1
root@dellx1:/home/myusername# ping -c 2 46.28.247.119
PING 46.28.247.119 (46.28.247.119) 56(84) bytes of data.
64 bytes from 46.28.247.119: icmp_seq=1 ttl=45 time=186 ms
64 bytes from 46.28.247.119: icmp_seq=2 ttl=45 time=209 ms

--- 46.28.247.119 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 186.804/198.203/209.603/11.408 ms
root@dellx1:/home/myusername#




So running dhclient eth1 restored the DNS service. And as you suspected, rebooting returned the problem. I ran the command again, and then, just for grins:



Code:

apt-get update
apt-get dist-upgrade




And as luck would have it, there was an update to network-manager included. After installing all of that and rebooting, the DNS server worked again and my browser's home page loaded promptly. So I thought woo-hoo!, but then got wary and rebooted a second time. And then the problem returned..~(8^{)=.. So there is still something else at fault, and an intermittent something at that.



Thanks for your response!




MoroS

#9
Hi. Sorry for the late response. I'm a bit busy right now. We'll need to configure your NetworkManager, so that it automatically runs the DHCP client to get the IP address from the DHCP server, but sadly I can't find the time to explain it step by step, so please wait a while. I understand that getting the network to work manually every time you boot the system is quite stressful, but I need some time to explain it step by step (including screenshots). I hope to complete it by the end of the week and if Pavroo doesn't mind, we'll post it on the website.
There's no such thing as "impossible". :)

pavroo

#10
It's good idea.
Nothing is easy as it looks. Danielle Steel
Join #sparkylinux.org at [url="//irc.libera.chat"]irc.libera.chat[/url]

frogprince

#11
MoroS: Thank you! I'll do a bit of investigating toward that end myself, and post what I find.

frogprince

#12
MoroS & Pavroo: I took the easy way out of this one and installed the latest Sparky. Fixed both the network and suspend problems. Runs great.

pavroo

#13
That's great !
Nothing is easy as it looks. Danielle Steel
Join #sparkylinux.org at [url="//irc.libera.chat"]irc.libera.chat[/url]

MoroS

#14
frogprince: Cool. We're glad that everything works, although it took a reinstall to make it that way. The tutorial is still going to made, just in case. :)
There's no such thing as "impossible". :)

View the most recent posts on the forum